﻿#ifndef P2PCHATROOM_H
#define P2PCHATROOM_H

#include <QWidget>
#include "chatroom.h"

class P2PChatRoom : public ChatRoom
{
    Q_OBJECT
public:
    explicit P2PChatRoom(const P2PChanneInfo &channel_info, QWidget *parent = Q_NULLPTR);
    ~P2PChatRoom() Q_DECL_OVERRIDE;
    void handle_msg(int type, const QVariantHash &msg) Q_DECL_OVERRIDE;
protected:
    QByteArray send_msg(int msg_type, const QString& text) Q_DECL_OVERRIDE;
private:
    void on_button_meeting_clicked(bool checked) Q_DECL_OVERRIDE;
    void on_button_camera_clicked(bool checked) Q_DECL_OVERRIDE;
    void on_list_online_user_customContextMenuRequested(const QPoint &pos) Q_DECL_OVERRIDE;
    void startSpeak() Q_DECL_OVERRIDE;
    void stopSpeak() Q_DECL_OVERRIDE;

    void setMicState(bool video, bool on, bool self);
    void sendMediaMsg(bool video, bool on);
};

#endif // P2PCHATROOM_H
